package 工厂方法模式.LoggerFactory;

public abstract class LoggerFactory {
    public abstract Logger createLogger();
}

class FileLoggerFactory extends LoggerFactory{
    public Logger createLogger() {
        return new FileLogger();
    }
}
class DataBaseLoggerFactory extends LoggerFactory{
    public Logger createLogger() {
        return new DataBaseLogger();
    }
}

//增加的控制台记录工厂
class ConsoleLoggerFactory extends LoggerFactory{
    public Logger createLogger() {
        return new ConsoleLogger();
    }
}